-
Notifications
You must be signed in to change notification settings - Fork 768
[SYCL] Switch build of SYCL runtime to C++17 #3447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
vladimirlaz
commented
Mar 30, 2021
•
edited
Loading
edited
- switch build of SYCL RT and SYCL unit tests to use C++17 standard;
- fix build issues exposed by build with VS 2017 compiler;
- workaround problem in googletest (Google Test fails to compile if a standard library implements LWG 2221 google/googletest#1616);
- update documentation accordingly.
/summary:run |
In general it's good direction. We should carefully understand impact before merge (and fix associated issues). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just gating it from accidental merge.
Interesting..., 9bc9b258b9d166a08426d734f428968a878d336a could be built successfully on Windows locally, but failed in CI. Or it passes locally because of different version of MSVC. I have this: |
Signed-off-by: Vyacheslav N Klochkov <[email protected]>
@vladimirlaz |
Signed-off-by: Vyacheslav N Klochkov <[email protected]>
/summary:run |
@vladimirlaz, please update https://github.com/intel/llvm/blob/sycl/sycl/doc/GetStartedGuide.md#c-standard along with this change |
done |
@@ -639,7 +639,7 @@ which contains all the symbols required. | |||
|
|||
## C++ standard | |||
|
|||
* DPC++ runtime and headers require C++14 at least. | |||
* DPC++ runtime and headers require C++17 at least. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vladimirlaz, could you confirm that there are no runtime library ABI breaking changes requiring us to increment the library version, please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idea for a separate PR: It would be good to have a static_assert somewhere in SYCL headers that would check that C++ is 17 or higher.
It would give user-friendly message instead of some unexpected compilation errors due to various reasons (using 'if constexpr', auto in template args, inline vars, etc. with C++14 option)
I am very concerned about how changing over to C++ 17 requirement might adversely impact users. Seems like this is an API breaking change, and would require rolling major version of sycl headers and libraries. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Holding off for more testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also clean-up code redundant with C++17, like this
// Type traits identical to those in std in newer versions. Can be removed when |
Is this going to be a different PR?
Yes this will be done in separate PR |
@pvchupin, ping. |
@vladimirlaz, please add a description to PR what this patch is doing. |
done |